package lab.jsp;

import java.io.IOException;
import java.util.Collection;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import lab.bmp.studio.Studio;

/**
 *
 * @author Smike
 */
public class Studios extends AbstractJSP<Collection<Studio>> {

    @Override
    public void _jspService(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        // do nothing, it's will be implemented by JSP
    }

    @Override
    protected Collection<Studio> getData() {
        try {
            return dao.findStudios();
        } catch (Exception ex) {
            Logger.getLogger(Studios.class.getName()).log(Level.SEVERE, null, ex);
            throw new RuntimeException(ex);
        }
    }

}
